home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / GMS / Source / C / Screens / HiResScreen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-04  |  1000 b   |  44 lines

  1. /*
  2. ** HiRes Picture Display
  3. ** ---------------------
  4. ** Opens a screen of 640x256 pixels in HIRES LACED mode.  You can even
  5. ** try SuperHiRes (SHIRES) if you change the appropriate flag in the
  6. ** GameScreen structure.
  7. */
  8.  
  9. #include <proto/games.h>
  10.  
  11. extern struct GMSBase *GMSBase;
  12. ULONG  _XCEXIT = NULL;
  13. APTR   PREFSNAME = DEFAULT;
  14.  
  15. void main(void)
  16. {
  17.   struct GameScreen *GameScreen;
  18.   struct Picture *pic;
  19.  
  20.   if (pic = LoadPicFile("GMS:demos/data/PIC.Pic640x256",GETPALETTE|VIDEOMEM)) {
  21.  
  22.      if (GameScreen = AddScreenTags(TAGS_GAMESCREEN,NULL,
  23.         GSA_MemPtr1,pic->Data,
  24.         GSA_AmtColours,pic->AmtColours,
  25.         GSA_Planes,pic->Planes,
  26.         GSA_ScrWidth,640,
  27.         GSA_ScrHeight,256,
  28.         GSA_PicWidth,pic->Width,
  29.         GSA_PicHeight,pic->Height,
  30.         GSA_ScrType,pic->ScrType,
  31.         GSA_Palette,pic->Palette,
  32.         GSA_ScrMode,HIRES|LACED,
  33.         TAGEND)) {
  34.  
  35.         ShowScreen(GameScreen);
  36.         WaitLMB();
  37.  
  38.    FreePic(pic);
  39.    }
  40.   DeleteScreen(GameScreen);
  41.   }
  42. }
  43.  
  44.